package com.hotacorp.opencloud.userservice.entity;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hotacorp.opencloud.common.resourcecommon.validator.group.AddGroup;

import lombok.Data;

/**
 * 客户端entity类
 * 
 * @author lwg
 * @email lwg@gmail.com
 * @date 2019-12-25 11:52:19
 */
@Data
@TableName("oauth_client_details")
public class OauthClientDetailsEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private Integer id;
	/**
	 * 应用标识
	 */
	@NotBlank(message="应用标识不能为空")
	private String clientId;
	/**
	 * 资源限定串(逗号分割)
	 */
	private String resourceIds;
	/**
	 * 应用密钥(bcyt) 加密
	 */
	private String clientSecret;
	/**
	 * 应用密钥(明文)
	 */
	@NotBlank(message="密钥不能为空", groups = {AddGroup.class})
	private String clientSecretStr;
	/**
	 * 范围
	 */
	private String scope;
	/**
	 * 5种oauth授权方式(authorization_code,password,refresh_token,client_credentials)
	 */
	@NotBlank(message="授权方式不能为空")
	private String authorizedGrantTypes;
	/**
	 * 回调地址 
	 */
	private String webServerRedirectUri;
	/**
	 * 权限
	 */
	private String authorities;
	/**
	 * access_token有效期
	 */
	private Integer accessTokenValidity;
	/**
	 * refresh_token有效期
	 */
	private Integer refreshTokenValidity;
	/**
	 * {}
	 */
	private String additionalInformation;
	/**
	 * 是否自动授权 是-true
	 */
	private String autoapprove;
	/**
	 * 
	 */
	private Integer status;
	/**
	 * 
	 */
	private Integer ifLimit;
	/**
	 * 
	 */
	private Integer limitCount;

}
